//assign用于将所有可枚举的属性从一个或多个源对象复制到目标对象
let target = {a:1,b:2}
let source1 = {b:3,c:4};
let source2 ={c:{age:10}};
Object.assign(target,source1,source2);
console.log(target);//{ a: 1, b: 3, c: { age: 10 } }
source2.c.age = 20;
console.log(target);